<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>博客登录系统</title>
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    body {
      font-family: 'Microsoft YaHei', sans-serif;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .login-container {
      background: white;
      padding: 40px;
      border-radius: 10px;
      box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
      width: 100%;
      max-width: 400px;
    }
    .login-header {
      text-align: center;
      margin-bottom: 30px;
    }
    .login-header h1 {
      color: #333;
      margin-bottom: 10px;
    }
    .form-group {
      margin-bottom: 20px;
    }
    label {
      display: block;
      margin-bottom: 5px;
      color: #555;
      font-weight: bold;
    }
    input {
      width: 100%;
      padding: 12px;
      border: 2px solid #ddd;
      border-radius: 5px;
      font-size: 16px;
      transition: border-color 0.3s;
    }
    input:focus {
      outline: none;
      border-color: #667eea;
    }
    .error-msg {
      color: #e74c3c;
      text-align: center;
      margin: 15px 0;
      min-height: 20px;
    }
    .login-btn {
      width: 100%;
      padding: 12px;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      border: none;
      border-radius: 5px;
      font-size: 16px;
      cursor: pointer;
      transition: transform 0.2s;
    }
    .login-btn:hover {
      transform: translateY(-2px);
    }
    .login-btn:active {
      transform: translateY(0);
    }
  </style>
</head>
<body>
<div class="login-container">
  <div class="login-header">
    <h1>博客登录系统</h1>
    <p>欢迎回来，请登录您的账户</p>
  </div>
  <form th:action="@{/login}" method="post">
    <div class="form-group">
      <label for="username">用户名</label>
      <input type="text" id="username" name="username" required
             placeholder="请输入用户名">
    </div>
    <div class="form-group">
      <label for="password">密码</label>
      <input type="password" id="password" name="password" required
             placeholder="请输入密码">
    </div>
    <div class="error-msg" th:text="${errorMsg}"></div>
    <button type="submit" class="login-btn">登录</button>
  </form>
</div>
</body>
</html>
